Hi guys. This question regards gtk+ gui development.
This code:

Code:
PAINTSTRUCT ps;
RECT lpRect;
.....
case WM_PAINT:
{
HDC hdc = BeginPaint(hwnd, &ps);
GetClientRect(hwnd, &lpRect);
HBRUSH Brush=CreateSolidBrush(RGB(0,0,0));
lpRect.bottom = 30;
FillRect(hdc, &lpRect, Brush);
EndPaint(hwnd, &ps);
}
is win32 api working code for win32 app. Lets say my app is 200 px in high, so it fils 30 px from top border with black color. Another thing, that code is in Message Loop so any positions changes i'll do - this area is filled.

Now, how to do same thing in gtk+? If i will use win api in gtk app (my app is for windows, yes) - it is not in message loop so it is useless, when app window gets repaint - it overrides it with default color of currently selected gtk theme.
Thanks in advance